/**
 * @Time    : 2022/03/10 14:11
 * @Author  : WanRongJia
 * @License : Software business license
 * @Site    : www.rich-f.com
 * @File    : buildErrObject.js
 * @Software: Rich Web Platform
 * @Function: 构造token验签
 * @Version : 1.0
 **/

const jwt = require('jsonwebtoken')

const buildJWT = function (data) {
    return jwt.sign(data, process.env.JWT_PASSWORD, { expiresIn: process.env.JWT_TIMEOUT })
};

module.exports = { buildJWT }